A solid state image pickup device formed by arranging pixels having a ranging function (to be referred to as distance measurement pixels hereinafter) as part or all of the pixels of the image pickup device in order to detect the distance to a subject by way of a phase difference detection method has been proposed (see, The Specification of Japanese Patent No. 4,027,113). A distance measurement pixel contains a plurality of photoelectric conversion sections therein and an image pickup device of the above-described type is so configured that light fluxes that pass through different pupil areas on the camera lens are guided to different photoelectric conversion sections. The optical images that are produced by light fluxes that have passed through different pupil areas are acquired by means of the signals obtained by the photoelectric conversion sections contained in each of the distance measurement pixels (to be referred to respectively as “image A” and “image B” hereinafter, which images may collectively be referred to as “images AB”). Then, the image pickup device detects the shift amount that is the amount of the relative positional change of the images AB (to be referred to also as “image shift amount” hereinafter). The distance to the subject to be imaged can be computationally determined by converting the image shift amount into a defocus amount. The expression of “defocus” refers to a situation where the imaging plane of the imaging lens does not agree with the image pickup plane (light receiving plane) and the imaging plane of the lens is shifted toward the optical axis and the quantity of defocus is referred to as defocus amount. With an arrangement as described above, the distance to the subject is measured unlike conventional contrast detection methods and hence the lens of the camera including such a device does not need to be moved for focusing. In other words, high speed and high accuracy ranging operations can be realized with such a device.
An image and a distance distribution (distance map) that corresponds to the image can be generated simultaneously by arranging a plurality of distance measurement pixels over the entire in-plane area of an image pickup device and using both image A and image B. The bokeh amount of a subject found in an image picked up by an image pickup device depends on the defocus amount and hence arbitrary image processing operations such as bokeh-addition processing, post-shooting refocus processing (a process of focusing at an arbitrary position) and/or other processing operations can be conducted appropriately by executing a processing operation on the basis of the distance distribution for the obtained image.